"use strict";
/// <reference no-default-lib="true" />
/// <reference lib="esnext" />
const { Vector2, Vector3, Vector4, Entity, Input, KeyCode } = Alice;
class Player extends Entity {
    constructor() {
        super();
        this.speed = 10.0;
    }
    onUpdate(dt) {
        if (Input.isKeyPress(KeyCode.A)) {
            this.position.x -= this.speed * dt;
        }
        else if (Input.isKeyPress(KeyCode.D)) {
            this.position.x += this.speed * dt;
        }
        else if (Input.isKeyPress(KeyCode.W)) {
            this.position.y -= this.speed * dt;
        }
        else if (Input.isKeyPress(KeyCode.S)) {
            this.position.y += this.speed * dt;
        }
    }
}
